<%layout("/common.html"){%>
<div class="box-header with-border">
	<div class="box-title">
		<i class="fa fa-user-o" style="font-size:12px;color:#6495ED;padding:0px 7px 0px 5px;"></i>
		<i style="font-size:16px">编辑请假流程表单</i>
		<li class="long-gray-underline"></li>
	</div>
	<div class="box-title">
		<div class="font-italic" style="font-size:15px;color:#1e5edb;padding:0px 7px 0px 26px;">
			<div style="width:800px;height:30px;float:left; padding-bottom:0em;border-bottom: 1px solid #eaecef;margin-bottom: 30px;">
				<div style=height:30px;float:left;">${shiro.getPrimaryPrincipal().userName} 在  &nbsp;&nbsp;</div> 
				<div class="timer" style="height:30px;float:left;"></div>
				<div height:100px;float:left;>&nbsp;&nbsp;编辑请假单</div>
			</div>
		</div>
	</div>
</div>
<div class="form-content">
	<div class="form-horizontal" id="form">
		<input type="hidden" id="id" value="${leave.id}">
		<input type="hidden" id="leave" name="leave" value="${leave}"/>
		<input type="hidden" id="taskId" name="taskId" value="${leave.taskId}"/>
		<input type="hidden" id="procInsId" name="procInsId" value="${leave.procInsId}"/>
		<input type="hidden" id="modelKey" name="modelKey" value="${leave.modelKey}"/>
		<!-- <input type="hidden" id="titleName" value="${shiro.getPrimaryPrincipal().userName}"> -->
		
		<div class="row">
			<div class="col-xs-6">
				<!--<div class="form-group">-->
				<div class="input-group">
					<label class="control-label col-sm-4" title="">
							 请假类型：<i class="fa icon-question hide"></i></label>
					<div class="col-sm-8">
						<select class="input-sm form-control" id="type" name="type" dictType="leave_type" defaultValue="${leave.type}"></select>
					</div>
				</div>
			</div>
			
			<div class="col-xs-6">
				<!--<div class="form-group">-->
				<div class="input-group">
					<label class="control-label col-sm-4" title="">
							 请假天数：<i class="fa icon-question hide"></i></label>
					<div class="col-sm-8">
						<#form:input id="days" type="number" class="required" value="${leave.days}"/>
					</div>
				</div>
			</div>
			
		</div>
		<div class="row">
			<div class="col-xs-6">
				<!--<div class="form-group">-->
				<div class="input-group">
					<label class="control-label col-sm-4" title="">
							请假原因：<i class="fa icon-question hide"></i></label>
					<div class="col-sm-8">
						<#form:input id="reason" value="${leave.reason}"/>
					</div>
				</div>
			</div>
			<div class="col-xs-6">
				<!--<div class="form-group">-->
				<div class="input-group">
					<label class="control-label col-sm-4" title="">
							领导意见：<i class="fa icon-question hide"></i></label>
					<div class="col-sm-8">
						<#form:input id="leaderOpinion"/>
					</div>
				</div>
			</div>
		</div>
		
		
		<div class="row">
			<div class="button">
				<#form:button class="btn btn-info" name="暂存" id="submit" icon="fa-check" onclick="submitPage('/absent/edit?isAgree=0')"/>&nbsp;
				<% if(leave.status == 'todo'){ %>
					<% if(leave.hasUnAuditPassFlow){ %>
					<#form:button class="btn btn-info" name="重发流程" id="submit" icon="fa-check" onclick="submitPage('/absent/edit')"/>
				<% } else { %>
					<#form:button class="btn btn-info" name="同意" id="submit" icon="fa-check" onclick="submitPage('/absent/edit?isAgree=1')"/>&nbsp;
					<#form:button class="btn btn-info" name="驳回" id="submit" icon="fa-check" onclick="addLayerCustom('/flowableOffice/back?taskId=${leave.taskId}&procInsId=${leave.procInsId}&modelKey=${leave.modelKey}', '驳回','560','350')"/>
					<#form:button class="btn btn-info" name="前加签" id="submit" icon="fa-check" onclick="addLayerCustom('/flowableOffice/beforeAddSign?taskId=${leave.taskId}&procInsId=${leave.procInsId}', '前加签','560','350')"/>&nbsp;
					<#form:button class="btn btn-info" name="后加签" id="submit" icon="fa-check" onclick="addLayerCustom('/flowableOffice/afterAddSign?taskId=${leave.taskId}&procInsId=${leave.procInsId}', '后加签','560','350')"/>&nbsp;
					<#form:button class="btn btn-info" name="转办" id="submit" icon="fa-check" onclick="addLayerCustom('/flowableOffice/transfer?taskId=${leave.taskId}&procInsId=${leave.procInsId}', '转办','560','350')"/>&nbsp;
					<#form:button class="btn btn-info" name="委派" id="submit" icon="fa-check" onclick="addLayerCustom('/flowableOffice/delegate?taskId=${leave.taskId}&procInsId=${leave.procInsId}', '委派','560','350')"/>
				<% } %>
			<% } %>
				<#form:button class="btn btn-default" name="关闭" id="cancel" icon="fa-mail-reply-all" onclick="closePage()"/>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript" src="${ctxPath}/js/demo/absent/absent.js"></script>
<%}%>